import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const system: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "系统管理",
			key: "system"
		},
		children: [
			{
				path: "/system/user",
				element: lazyLoad(React.lazy(() => import("@/pages/system/User/index"))),
				meta: {
					title: "用户管理",
					requiresAuth: true,
					key: "/system/user",
					icon: ""
				}
			},
			{
				path: "/system/role",
				element: lazyLoad(React.lazy(() => import("@/pages/system/Role/index"))),
				meta: {
					title: "角色管理",
					requiresAuth: true,
					key: "/system/role",
					icon: ""
				}
			},
			{
				path: "/system/organization",
				element: lazyLoad(React.lazy(() => import("@/pages/system/Organization/index"))),
				meta: {
					title: "组织管理",
					requiresAuth: true,
					key: "/system/organization",
					icon: ""
				}
			},
			{
				path: "/system/post",
				element: lazyLoad(React.lazy(() => import("@/pages/system/Post/index"))),
				meta: {
					title: "岗位管理",
					requiresAuth: true,
					key: "/system/post",
					icon: ""
				}
			},
			{
				path: "/system/menu",
				element: lazyLoad(React.lazy(() => import("@/pages/system/Menu/index"))),
				meta: {
					title: "菜单管理",
					requiresAuth: true,
					key: "/system/menu",
					icon: ""
				}
			},
			{
				path: "/system/dict",
				element: lazyLoad(React.lazy(() => import("@/pages/system/Dict/index"))),
				meta: {
					title: "字典管理",
					requiresAuth: true,
					key: "/system/dict",
					icon: ""
				}
			},
		]
	}
];

export default system;
